<?php
/**
 * Created by PhpStorm.
 * User: kang
 * Date: 2019-09-07
 * Time: 12:16
 */

namespace app\Validate;
use think\Validate;

class Project extends Validate
{
    protected $rule =   [
        'title'    => 'require|length:2,20|unique:project,is_del=0&is_hid=0',
        'project_url'    => 'require|max:200',
        'remark'    => 'max:200',
    ];

    protected $message  =   [
        'title.require' => '请填写项目名称',
        'title.length'     => '项目名称必须在2~20位之间',
        'title.unique'     => '项目名称已存在，不能重复使用',
        'project_url.require' => '请填写项目地址',
        'project_url.max'     => '项目地址最长不能超过200位',
        'remark.max'     => '备注最长不能超过200位'
    ];
}